const {ccclass, property} = cc._decorator;

@ccclass
export default class desItemTs extends cc.Component {

    @property(cc.Node)
    content:cc. Node = null;
    @property(cc.Label)
    labelNum:cc.Label = null;

    public data:any = null;

    // use this for initialization
    itemDataAssignment(obj,tableviewUtils){
        this.data = obj;
        this.Refresh_view();
    }

    Play_AppearAnimation()
    {
        this.content.setPosition(0,1000);
        var _action = cc.moveTo(0.3, cc.v2(0, 0)).easing(cc.easeOut(10.0));
        this.content.runAction(
             cc.sequence(_action, cc.callFunc(() => {
                this.data.itemData.isApeard = true;
             }))
        );
    }

    Refresh_view()
    {
        var itemData = this.data.itemData;
        this.labelNum.string = itemData.labelNum;

        if(!this.data.itemData.isApeard)
        {
            this.Play_AppearAnimation();
        }
    }
}
